<include file="public@header"/>
</head>
<body>
<div class="layui-fluid js-check-wrap">
    <div class="layui-card">
        <div class="layui-card-header well">
            <div class="layui-col-xs6">
                <h3>{:lang('ADMIN_HOOK_INDEX')}</h3>
            </div>
            <div class="layui-col-xs6 text-right">
                <!-- 添加分类 -->
                <a href="{:url('Hook/sync')}" class="layui-btn layui-btn-normal ">同步钩子</a>
            </div>
        </div>

        <div class="layui-card-body">
            <php>
                $types = ["1"=>'系统钩子','2'=>'应用钩子','3'=>'模板钩子','4'=>'后台模板钩子'];
            </php>
            <table class="layui-table">
                <thead>
                <tr>
                    <th width="40">ID</th>
                    <th>名称</th>
                    <th>类型</th>
                    <th>描述</th>
                    <th width="150">{:lang('ACTIONS')}</th>
                </tr>
                </thead>
                <tbody>
                <foreach name="hooks" item="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.name}:{$vo.hook}</td>
                        <td>{$types[$vo.type]}</td>
                        <td>{$vo.description}</td>
                        <td>
                            <a href="javascript:parent.openIframeLayer('{:url('Hook/plugins',['hook'=>$vo['hook']])}','钩子{$vo.name}插件管理',{});">管理插件</a>
                        </td>
                    </tr>
                </foreach>
                </tbody>
            </table>
        </div>        
    </div>
</div>

<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
